/**
 * 
 */
package com.res.common.controller;

import javax.servlet.http.HttpSession;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.core.env.Environment;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.SessionAttributes;
import org.springframework.web.context.request.RequestContextHolder;
import org.springframework.web.context.request.ServletRequestAttributes;

import com.res.system.properties.PropertyManager;

/**
 * @author Dhanuska Ariyasingha.
 *
 */
@Controller
@SessionAttributes
public class BaseController {

    public HttpSession getSession() {
        
        ServletRequestAttributes requestAttribute = (ServletRequestAttributes) RequestContextHolder.currentRequestAttributes();
        return requestAttribute.getRequest().getSession(true); // true == allow create
        

    }

}
